﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Controls="clr-namespace:Sinacor.Infra.UI.Controls.SmartClient;assembly=Sinacor.Infra.UI.Controls">

    <Style TargetType="{x:Type Controls:SinacorFolderPicker}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Controls:SinacorFolderPicker}">
                    <Grid Name="PART_RootGrid" Background="Transparent" HorizontalAlignment="Stretch" VerticalAlignment="Top">
                        <StackPanel Orientation="Horizontal">
                            <Controls:SinacorTextBox x:Name="PART_txtPath" Width="{TemplateBinding WidthPath}" />
                            <Controls:SinacorButton Content="{DynamicResource Infra.Controls.Label.Buscar}" x:Name="PART_btSearch_Text" Width="{TemplateBinding WidthButton}" Margin="5,0,0,0"/>
                            <Controls:SinacorButton x:Name="PART_btSearch_Icon" Icon="IconButtonNew" VerticalAlignment="Top" Visibility="Collapsed" Margin="5,0,0,0"/>
                        </StackPanel>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="ErrorTemplate">
            <Setter.Value>
                <ControlTemplate>
                    <Border BorderBrush="{DynamicResource BrushTextBoxBorderError}" BorderThickness="1" CornerRadius="4" HorizontalAlignment="Left" Width="{Binding AdornedElement.WidthPath, ElementName=PART_AdornedElementPlaceholder}" Height="{Binding ActualHeight, ElementName=PART_AdornedElementPlaceholder}">
                        <AdornedElementPlaceholder x:Name="PART_AdornedElementPlaceholder" VerticalAlignment="Top" HorizontalAlignment="Left" Margin="-1"/>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>